package com.example.metodo_post;

import java.util.ArrayList;
import java.util.List;
import android.os.Bundle;
import android.app.Activity;
import android.content.Intent;
import android.view.Menu;
import android.view.View;
import android.widget.*;

public class MainActivity extends Activity {
	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.activity_main);
		
		/* TESTING SPINNER
		//ArrayAdapter<CharSequence> adapter = ArrayAdapter.createFromResource(this,R.array.planets_array, android.R.layout.simple_spinner_dropdown_item);
		//adapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);
		//spinner.setAdapter(adapter);
		*/
		ver_clientes mostrar = new ver_clientes();
		Button boton;
		final EditText textbox;
		boton = (Button) findViewById(R.id.button1);
		textbox = (EditText) findViewById(R.id.editText1);
		
		boton.setOnClickListener(new View.OnClickListener() {
			
			@Override
			public void onClick(View v) {
				// TODO Auto-generated method stub
				web_page url = new web_page();
				/*List<String> respuesta= url.metodo_retorno("http://"+textbox.getText()+"/1.php");*/
				//url.setUrl(textbox.toString());
				//Intent intent=new Intent(getApplicationContext(),ver_clientes.class);
				Intent intent=new Intent(getApplicationContext(),editar_cliente.class);
				intent.putExtra("server_url", textbox.getText().toString());  
		        startActivity(intent);
			}
		});
	}

	@Override
	public boolean onCreateOptionsMenu(Menu menu) {
		// Inflate the menu; this adds items to the action bar if it is present.
		getMenuInflater().inflate(R.menu.main, menu);
		return true;
	}

}
